package cn.com.haopy.yue.ai.core.config.tm;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "haopy-yue-ai.im")
@Data
public class TmProperties {
    private Long appId;

    private String secretkey;

    private String appPrefix;

    //前端tm用户id前缀
    private String wxUserIdPrefix;

    //医生tm用户id前缀
    private String doctUserIdPrefix;

    private String pharUserIdPrefix;

    private String identifier;

    private String msgUrl;


    public String getTmUserId(Integer userId) {
        return appPrefix + "_" + wxUserIdPrefix + "_" + userId;
    }

    public String getTmDocId(Integer docId) {
        return appPrefix + "_" + doctUserIdPrefix + "_" + docId;
    }

    public String getTmPhaId(Integer phaId) {
        return appPrefix + "_" + pharUserIdPrefix + "_" + phaId;
    }

}
